package org.lex.swt.tree;

import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.Viewer;
import org.lex.collection.tree.ITreeNode;

public class TreeNodeContentProvider implements ITreeContentProvider {

	@Override
	public Object[] getChildren(Object node) {
		return ((ITreeNode) node).getChildren();
	}

	@Override
	public Object getParent(Object node) {
		return ((ITreeNode) node).getParent();
	}

	@Override
	public boolean hasChildren(Object node) {
		return ((ITreeNode) node).hasChildren();
	}

	@Override
	public Object[] getElements(Object node) {
		return ((ITreeNode) node).getChildren();
	}

	@Override
	public void dispose() {
		// TODO Auto-generated method stub
	}

	@Override
	public void inputChanged(Viewer arg0, Object arg1, Object arg2) {
		// TODO Auto-generated method stub
	}
}
